-- GENERATED SPELL FOR [Spire Spider] --


function spell0_10374(pUnit, Event) --@Crystallize,n/a--
pUnit:FullCastSpellOnTarget(16104,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10374', 6280, 1)
end

function spell1_10374(pUnit, Event) --@Summon Spire Spiderling,Self--
pUnit:FullCastSpellOnTarget(16103,pUnit)
pUnit:RegisterEvent('Sorts_10374', 632, 1)
end

function Sorts_10374(pUnit, Event)
local choix_sorts_10374 = math.random(0, 1)
if choix_sorts_10374 == 0 then
pUnit:RegisterEvent('spell0_10374', 1, 1)
end
if choix_sorts_10374 == 1 then
pUnit:RegisterEvent('spell1_10374', 1, 1)
end
end

function mob10374_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10374', math.random(1500, 3000), 1)
end

function mob10374_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10374_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10374_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10374, 1, 'mob10374_Action')
RegisterUnitEvent(10374, 2, 'mob10374_Leave')
RegisterUnitEvent(10374, 3, 'mob10374_Kill')
RegisterUnitEvent(10374, 4, 'mob10374_Die')
